home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat4 / ifl / ppm.z / ppm
Encoding:
Text File  |  2002-10-03  |  4.1 KB  |  133 lines

  1.  
  2.  
  3.  
  4. ppppppppmmmm((((5555))))            IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll             ppppppppmmmm((((5555))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ppm - portable pixmap file format
  10.  
  11. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  12.      The portable pixmap format is a lowest common denominator color image
  13.      file format.  The definition is as follows:
  14.  
  15.      - A "magic number" for identifying the file type.  A ppm file's magic
  16.        number is the two characters "P3".
  17.  
  18.      - Whitespace (blanks, TABs, CRs, LFs).
  19.  
  20.      - A width, formatted as ASCII characters in decimal.
  21.  
  22.      - Whitespace.
  23.  
  24.      - A height, again in ASCII decimal.
  25.  
  26.      - Whitespace.
  27.  
  28.      - The maximum color-component value, again in ASCII decimal.
  29.  
  30.      - Whitespace.
  31.  
  32.      - Width * height pixels, each three ASCII decimal values between 0 and
  33.        the specified maximum value, starting at the top-left corner of the
  34.        pixmap, proceeding in normal English reading order.  The three values
  35.        for each pixel represent red, green, and blue, respectively; a value of
  36.        0 means that color is off, and the maximum value means that color is
  37.        maxxed out.
  38.  
  39.      - Characters from a "#" to the next end-of-line are ignored (comments).
  40.  
  41.      - No line should be longer than 70 characters.
  42.  
  43.      Here is an example of a small pixmap in this format:
  44.      P3
  45.      # feep.ppm
  46.      4 4
  47.      15
  48.       0  0  0    0  0  0    0  0  0   15  0 15
  49.       0  0  0    0 15  7    0  0  0    0  0  0
  50.       0  0  0    0  0  0    0 15  7    0  0  0
  51.      15  0 15    0  0  0    0  0  0    0  0  0
  52.  
  53.      Programs that read this format should be as lenient as possible,
  54.      accepting anything that looks remotely like a pixmap.
  55.  
  56.      There is also a variant on the format, available by setting the RAWBITS
  57.      option at compile time.  This variant is different in the following ways:
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ppppppppmmmm((((5555))))            IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll             ppppppppmmmm((((5555))))
  71.  
  72.  
  73.  
  74.      - The "magic number" is "P6" instead of "P3".
  75.  
  76.      - The pixel values are stored as plain bytes, instead of ASCII decimal.
  77.  
  78.      - Whitespace is not allowed in the pixels area, and only a single
  79.        character of whitespace (typically a newline) is allowed after the
  80.        maxval.
  81.  
  82.      - The files are smaller and many times faster to read and write.
  83.  
  84.      Note that this raw format can only be used for maxvals less than or equal
  85.      to 255.  If you use the _p_p_m library and try to write a file with a larger
  86.      maxval, it will automatically fall back on the slower but more general
  87.      plain format.
  88.  
  89. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  90.      giftoppm(1), gouldtoppm(1), ilbmtoppm(1), imgtoppm(1), mtvtoppm(1),
  91.      pcxtoppm(1), pgmtoppm(1), pi1toppm(1), picttoppm(1), pjtoppm(1),
  92.      qrttoppm(1), rawtoppm(1), rgb3toppm(1), sldtoppm(1), spctoppm(1),
  93.      sputoppm(1), tgatoppm(1), ximtoppm(1), xpmtoppm(1), yuvtoppm(1),
  94.      ppmtoacad(1), ppmtogif(1), ppmtoicr(1), ppmtoilbm(1), ppmtopcx(1),
  95.      ppmtopgm(1), ppmtopi1(1), ppmtopict(1), ppmtopj(1), ppmtopuzz(1),
  96.      ppmtorgb3(1), ppmtosixel(1), ppmtotga(1), ppmtouil(1), ppmtoxpm(1),
  97.      ppmtoyuv(1), ppmdither(1), ppmforge(1), ppmhist(1), ppmmake(1),
  98.      ppmpat(1), ppmquant(1), ppmquantall(1), ppmrelief(1), pnm(5), pgm(5),
  99.      pbm(5)
  100.  
  101. AAAAUUUUTTTTHHHHOOOORRRR
  102.      Copyright (C) 1989, 1991 by Jef Poskanzer.
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.